
MODULE modulo;
FROM InOut IMPORT ReadCard, WriteCard, WriteString, WriteLn;

VAR x, y : CARDINAL;

BEGIN
    WriteString("x = "); ReadCard(x);WriteLn;
    WriteString("y = "); ReadCard(y);WriteLn;
    WHILE ( x <> y ) DO
        IF ( x > y ) THEN x := x - y
        ELSE y := y - x;
        END
    END;
    WriteString("MCD = ");WriteCard(x,6);WriteLn;
END modulo.
